using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace SilverSea.Video.Tools
{
	public class frmViewImage : Form
	{
		private IContainer icontainer_0;
		private PictureBox pictureBox1;
		private CheckBox chkFitImage;
		private Label lblVideoSize;
		private System.Drawing.Image image_0;
		public System.Drawing.Image CurrentImage
		{
			get
			{
				return this.image_0;
			}
			set
			{
				this.image_0 = value;
			}
		}
		public frmViewImage()
		{
			this.InitializeComponent();
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.icontainer_0 != null)
			{
				this.icontainer_0.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmViewImage));
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.chkFitImage = new System.Windows.Forms.CheckBox();
            this.lblVideoSize = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.SuspendLayout();
            // 
            // pictureBox1
            // 
            resources.ApplyResources(this.pictureBox1, "pictureBox1");
            this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.TabStop = false;
            // 
            // chkFitImage
            // 
            resources.ApplyResources(this.chkFitImage, "chkFitImage");
            this.chkFitImage.Name = "chkFitImage";
            this.chkFitImage.UseVisualStyleBackColor = true;
            this.chkFitImage.CheckedChanged += new System.EventHandler(this.chkFitImage_CheckedChanged);
            // 
            // lblVideoSize
            // 
            resources.ApplyResources(this.lblVideoSize, "lblVideoSize");
            this.lblVideoSize.Name = "lblVideoSize";
            // 
            // frmViewImage
            // 
            resources.ApplyResources(this, "$this");
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.lblVideoSize);
            this.Controls.Add(this.chkFitImage);
            this.Controls.Add(this.pictureBox1);
            this.Name = "frmViewImage";
            this.Load += new System.EventHandler(this.frmViewImage_Load);
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		private void frmViewImage_Load(object sender, EventArgs e)
		{
			this.pictureBox1.Image = this.image_0;
			if (this.image_0 != null)
			{
				this.lblVideoSize.Text = string.Concat(new object[]
				{
					"Size: ",
					this.image_0.Width,
					"x",
					this.image_0.Height
				});
				return;
			}
			this.lblVideoSize.Text = string.Empty;
		}
		private void chkFitImage_CheckedChanged(object sender, EventArgs e)
		{
			if (this.chkFitImage.Checked)
			{
				this.pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize;
				return;
			}
			this.pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
			this.pictureBox1.Size = new System.Drawing.Size(640, 480);
		}
	}
}
